using System.ComponentModel;
using System.Threading.Tasks;
using Abp.Application.Services.Dto;
using SingleUserMall.Common;
using SingleUserMall.Users.Form;
using SingleUserMall.Users.VO;

namespace SingleUserMall.Users
{
    /// <summary>
    /// 用户
    /// </summary>
    [Description("用户")]
    public interface IUserAppService : IAppService
    {
        /// <summary>
        /// 微信登录并获取用户信息
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        Task<UserMiniVO> LoginWithWechatAsync(WechatInfo info);
        /// <summary>
        /// 账号登录
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<UserMiniVO> LoginAsync(UserAppLoginForm form);
        /// <summary>
        /// 用户登出并清除openId
        /// </summary>
        /// <returns></returns>
        Task LogoutAsync();
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <returns></returns>
        Task<UserMiniVO> GetUserInfoAsync();
        /// <summary>
        /// 发送短信验证码
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task SendCodeAsync(SendCodeForm form);
        /// <summary>
        /// 注册会员
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<UserMiniVO> RegisterAsync(RegisterFrom form);

        /// <summary>
        /// 设置手机号码
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task SetPhoneNumberAsync(VerifyCodeForm form);
        /// <summary>
        /// 设置密码
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task SetPasswordAsync(SetPasswordForm form);
        /// <summary>
        /// 获取收益
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<InComeVO> GetUserCommisionAsync();
        /// <summary>
        /// 获取佣金明细
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<UserCommissionVO>> GetUserCommisionsAsync(UserCommissionPagedForm form);
        /// <summary>
        /// 获取当前用户分红记录
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<UserDividendsAppVO>> GetUserDividendAsync(PagedForm form);
        /// <summary>
        /// 获取提现明细
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<UserCashVO>> GetUserCashesAsync(UserCashPagedForm form);
        /// <summary>
        /// 提现
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task CashAsync(UserCashForm form);
        /// <summary>
        /// 获取推广用户
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<UserVO>> GetSpreadUsersAsync(SpreadPagedForm form);

        /// <summary>
        /// 注册推广大使
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
       Task RegisterPromotionAsync(UserPromotionForm form);
 
        /// <summary>
        /// 获取用户收藏列表
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<UserFavoriteVO>> GetUserFavoritesAsync(PagedForm form);
        /// <summary>
        /// 获取银行卡列表
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<UserCardVO>> GetUserCardsAsync();
        /// <summary>
        /// 获取支持的银行列表
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<BankVO>> GetBanksAsync();
        /// <summary>
        /// 保存银行卡
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task SaveUserCardAsync(UserCardForm form);
        /// <summary>
        /// 删除银行卡
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task RemoveUserCardAsync(SingleId<long> form);

        /// <summary>
        /// 保存实名认证信息
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task SaveVerifiedAsync(VerifiedForm form);
        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<UserMiniVO> ModifyUserAsync(UserModifiedForm form);
        /// <summary>
        /// 获取左右可送的用户
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<UserVO>> GetAllCanSendUsersAsync(SimpleUserSearchForm form);
        /// <summary>
        /// 获取用户所有收益
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<ProfitVO> GetUserProfit();
        /// <summary>
        /// 用户体验金和可用体验金明细
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<UserPointsVO>> GetUserPointsAsync(UserAppPointPagedForm form);
        /// <summary>
        /// 分享商品 参数id为商品Id
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task ShareItem(ShareForm form);
    }
}